Generate arginfo unconditionally in gen_stubs.php#20994
Generate arginfo unconditionally in gen_stubs.php#20994arnaud-lb wants to merge 1 commit intophp:masterfrom
Conversation
|
I've taken the liberty to add a "Closes" for the other PR that I mentioned in my original comment the PR description. |
|
IIRC the reason the stub hash exists is to not require PHP-Parser (which requires network to download) for non-dev builds of PHP. I think this change is going to break builds in environments that disable network access (i.e. typical distro build environments). |
|
Using the stub hash is also very practical to avoid regenerating everything (which indeed takes a bit of time), when not directly addressing a single file. In the very most cases, not force regenerating is exactly what you want. |
I fully agree with @nikic, downloading the PHP-Parser bundle when not necessary is counter-productive. You can't rely on the files timestamps to be correctly aligned, even when unpacking a dist tar.gz file. So depending on which file, between arginfo and stub, takes the fresher timestamp, you would end up with different outcomes. Related to this, I just updated my PR #20891 to align the file timestamps even when hash check determines there is no need to regenerate. |
|
Thank you everyone for the feedback. I'm closing this. |
See #20917 (comment)
gen_stub.phpnow behaves as if--force-regenerationwas given-f/--force-regenerationoptions are removed (they are silently ignored, so it's backwards compatible).Context::$forceParse,Context::$forceRegenerationCloses GH-20891.